<html>
    <head>
        <meta charset="utf-8"/>
        <script type="text/javascript" src="./Public/jquery-3.2.1.min.js"></script>
    </head>
    
    <body>
        <input type="button" onclick="json_data(123)" value="拿到test传值"/>
        
    </body>
    <script type="text/javascript">
       function json_data(id) {
           var state_end = 1; 
           var state_start = 1; 
           $.post(
                "__URL__/test",
                {id:id,state_end:state_end,state_start:state_start},
                function(data) {
                    console.log(data);
                    if(data.state_start==1 && data.state_end==1) {
                        alert(data.text);
                    }
                }
            );
       }
    </script>
        
</html>